package com.iwop.moto.service.impl;

import com.iwop.moto.dao.MBrokerageDao;
import com.iwop.moto.model.MBrokerage;
import com.iwop.moto.service.MBrokerageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by mobom on 2016/12/14.
 */
@Service
public class MBrokerageServiceImpl implements MBrokerageService {

    @Autowired
    private MBrokerageDao mBrokerageDao;

    @Override
    public void insert(MBrokerage mBrokerage) {
        mBrokerageDao.insert(mBrokerage);
    }

    @Override
    public List<MBrokerage> findBrokerageList(String store_id) {
        return mBrokerageDao.findBrokerageList(store_id);
    }

    @Override
    public MBrokerage findOneBySid(String sid) {
        return mBrokerageDao.findOneById(sid);
    }

    @Override
    public MBrokerage findBrokerageByOutTradeNo(String orderId) {
        return mBrokerageDao.findBrokerageByOutTradeNo(orderId);
    }
}
